<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"   
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:composite="http://java.sun.com/jsf/composite">
    
    <composite:interface>        	
    </composite:interface>
	
	<composite:implementation>	
		<div class="box box-50 altbox">
			<h:form styleClass="plain" id="adeudosForm">
			<f:event listener="#{condominiumsDebtsBean.fillDebtsTable}" type="preRenderView" />	
			<div class="boxin">
					<div class="header">
						<h3>#{condominiumsDebtsBean.debsHeader}</h3>
						<h:commandLink action="#{condominiumsDebtsBean.pdfExportAction}" styleClass="button" value="Exportar a PDF" />														
					</div>
					<div class="content">
						<div align="left" style="OVERFLOW: scroll; WIDTH: 470px; HEIGHT: 400px;">
							<table cellspacing="0">
									<thead>
										<tr>
											<th>Casa</th>
											<td class="tc">Nombre</td>
											<td class="tc">Descripcion</td>
											<td class="tc">Monto</td>
										</tr>
									</thead>
									<tbody>
										<ui:repeat var="row" value="#{condominiumsDebtsBean.condominiumsList}" varStatus="status">		 				
						 					<tr class="first">
												<td class="tc">#{row.houseNumber}</td>
												<td class="tc">#{row.userView.nombre} #{row.userView.apaterno} #{row.userView.amaterno}</td>
												<td class="tc">#{row.debDescription}</td>
												<td class="tc"><h:outputLabel value="#{row.debt}" style="#{row.debt eq '0.00' ? 'color: red;' : ''}" /> </td>															
											</tr>										 				
						 				</ui:repeat>
									</tbody>
							</table>
						</div>
					</div>
				</div>
			</h:form>
		</div>
	</composite:implementation>
	
</html>